<div class="container r-content">
  <div class="row">
    <div class="form-group text-center register-header">
      <span>注册账号</span>
    </div>
    <form class="form-horizontal mform" novalidate="" name="registerForm">
      <div class="form-group" ng-class="{'has-error':registerForm.email.$dirty && registerForm.email.$invalid}">
        <div class="col-sm-9">
          <input name="email" type="email" class="form-control" placeholder="邮箱" ng-model="user.email" required />
          <div ng-show="registerForm.email.$dirty && registerForm.email.$invalid">
            <span class="error-text" ng-show="registerForm.email.$error.email">邮箱格式错误</span>
            <span class="error-text" ng-show="registerForm.email.$error.required">请填写您的邮箱</span>
          </div>
        </div>
      </div>

      <div class="form-group"  ng-class="{'has-error':registerForm.passwd.$dirty && registerForm.passwd.$invalid}">
        <div class="col-sm-9">
          <input name="passwd" type="password" id="passwd" class="form-control" placeholder="密码" ng-model="user.passwd" required ng-minlength="6" ng-maxlength="30" />
          <div ng-show="registerForm.passwd.$dirty && registerForm.passwd.$invalid">

            <span class="text-danger error-text" ng-show="registerForm.passwd.$error.required">密码不能为空</span>
            <span class="text-danger error-text" ng-show="registerForm.passwd.$error.minlength || registerForm.passwd.$error.maxlength">密码长度在6到30位之间！</span>
          </div>
        </div>
      </div>

      <div class="form-group"  ng-class="{'has-error':registerForm.repasswd.$dirty && registerForm.repasswd.$invalid}">
        <div class="col-sm-9">
          <input name="repasswd" type="password" class="form-control" placeholder="确认密码" ng-model="repasswd" pw-check="passwd"/>
          <div ng-show="registerForm.repasswd.$dirty && registerForm.repasswd.$valid">
            <span ng-show="registerForm.repasswd.$valid" class="glyphicon glyphicon-ok input_result"></span>
          </div>
          <div ng-show="registerForm.repasswd.$dirty && registerForm.repasswd.$invalid">

            <span class="error-text text-danger" ng-show="registerForm.repasswd.$error.pwmatch">两次密码不同</span>
          </div>

        </div>
      </div>

      <div class="form-group">
        <div class="col-sm-9">
          <button type="submit" class="btn btn-info btn-block" ng-disabled="registerForm.$invalid" ng-click="registerClick()">注册</button>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-9 col-sm-offset-2">
          <div class="checkbox">
            <a href="#" ui-sref="/login">已有账户？马上登陆</a>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>